<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>资料详情</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" href="/static/wx/lib/sui/sm.min.css">
    <link rel="stylesheet" href="/static/wx/lib/sui/sm-extend.min.css">
    <link rel="stylesheet" href="/static/wx/css/reset.css">
    <link rel="stylesheet" href="/static/wx/css/main.css">
    <link rel="stylesheet" href="/static/wx/css/public_main.css">

    <script type='text/javascript' src='/static/wx/lib/sui/zepto.min.js' charset='utf-8'></script>
    <script type='text/javascript' src='/static/wx/lib/sui/sm.min.js' charset='utf-8'></script>
    <script type='text/javascript' src='/static/wx/lib/sui/sm-extend.min.js' charset='utf-8'></script>
    <script type="text/javascript" src="/static/wx/layui/layui.js"></script>
</head>

<body>
    <div class="page-group">
        <div class="page page-current" id="stay_audit">
            <!-- 主内容 -->
            <input type="hidden" value="{$info.goods_info.policy_num}" name='policy_num'/>
            <div class="content">
                <div class="item-card" style="padding:.5rem 0">
                    <div class="item-card-header">状态：{$info.info.status_str}</div>
                    <div class="item-card-content">
                        {in name="info.status" value="1,2,4"}
                        <div class="item-card-content-item">
                            请在 {$info.info.recordor_commit} 前录入递交
                        </div>
                        {/in}
                        {in name="info.status" value="2,3,4"}
                        <div class="item-card-content-item">
                            录入时间： {$info.info.creat}
                        </div>
                        {/in}
                        {in name="info.status" value="4"}
                        <div class="item-card-content-item">
                            完成时间： {$info.info.complete_at}
                        </div>
                        {/in}

                    </div>
                </div>
                <div class="item-card">
                    <div class="item-card-header">保单险种</div>
                    <div class="item-card-content">
                        <div class="item-card-content-item">
                            保单号：{$info.goods_info.report_num}
                        </div>
                        <div class="item-card-content-item">
                            报案号：{$info.goods_info.policy_num}
                        </div>
                        <div class="item-card-content-item">
                            出险险种：{$info.goods_info.insurance_type_name}
                        </div>
                    </div>
                </div>
                <div class="item-card">
                    <div class="item-card-header">
                        <div>货品信息</div>
                        {in name="info.status" value="3"}
                        {if  isset($info.bohui_info.goods_return) && !empty($info.bohui_info.goods_return)}
                        <div class="btn" id="goods_info">修改</div>
                        <script>
                            $(function () {
                                $('#goods_info').on('touchend', function () {
                                    var poliecy = $("input[ name='policy_num']").val();
                                    location.href="{:url('recordor/update1')}?policy_num="+poliecy;
                                });
                            })
                        </script>
                        {/if}
                        {/in}
                    </div>
                    <div class="item-card-content">
                        <div class="item-card-content-item">
                            货品类别：{$info.goods_info.goods_type_name}
                        </div>
                        <div class="item-card-content-item">
                            货品名称：{$info.goods_info.goods_name}
                        </div>
                        <div class="item-card-content-item">
                            数量与规格： {$info.goods_info.goods_num }
                        </div>
                        <div class="item-card-content-item">
                            物品原值：{if !empty($info.goods_info.good_price)}{$info.goods_info.good_price }万元{/if}
                        </div>
                        <div class="item-card-content-item">
                            评估价：{if !empty($info.goods_info.good_pg_price)}{$info.goods_info.good_pg_price }万元{/if}
                        </div>
                    </div>
                    {in name="info.status" value="3"}
                    {if  isset($info.bohui_info.goods_return) && !empty($info.bohui_info.goods_return)}
                    <div class="edit-content">
                        {volist name="info.bohui_info.goods_return" id="goods_return"}
                        修改内容：{$goods_return}<br/>
                        {/volist}
                    </div>
                    {/if}
                    {/in}
                </div>
                <div class="item-card">
                    <div class="item-card-header">
                        <div>货品受损</div>
                        {in name="info.status" value="3"}
                        {if  isset($info.bohui_info.goods_return) && !empty($info.bohui_info.under_return)}
                        <div class="btn" id="return">修改</div>
                        <script>
                            $(function () {
                                $('#return').on('touchend', function () {
                                    var poliecy = $("input[ name='policy_num']").val();
                                    location.href="{:url('recordor/update2')}?policy_num="+poliecy;
                                });
                            })
                        </script>

                        {/if}
                        {/in}
                    </div>
                    <div class="item-card-content">
                        <div class="item-card-content-item">
                            受损时间：{$info.goods_info.damage_at }
                        </div>
                        <div class="item-card-content-item">
                            受损原因：{$info.goods_info.damage_result }
                        </div>
                        <div class="item-card-content-item" style="display:flex">
                            <div> 货品所在地：</div>
                            <div>
                                <div>{if !empty($info.goods_info.omit)}{$info.goods_info.omit}省{/if}{if !empty($info.goods_info.city)}{$info.goods_info.city}市{/if}{$info.goods_info.classify}</div>
                                <div>{$info.goods_info.address_detail}</div>
                            </div>
                        </div>

                        {if !empty($info.goods_info.other_report)}
                        {volist name="info.goods_info.other_report" id="voe"}
                        <div class="item-card-content-item">
                            第三方报告：{$voe.name}
                        </div>
                        {/volist}
                        {/if}
                    </div>
                    {in name="info.status" value="3"}
                    {if  isset($info.bohui_info.goods_return) && !empty($info.bohui_info.under_return)}
                    <div class="edit-content">
                        {volist name="info.bohui_info.under_return" id="under_return"}
                        修改内容：{$under_return}<br/>
                        {/volist}
                    </div>
                    {/if}
                    {/in}
                </div>
                <div class="item-card">
                    <div class="item-card-header">
                        <div>货品现状</div>
                        {in name="info.status" value="3"}
                        {if  isset($info.bohui_info.goods_return) && !empty($info.bohui_info.situation_return)}
                        <div class="btn" id="now_st">修改</div>
                        <script>
                            $(function () {
                                $('#now_st').on('touchend', function () {
                                    var poliecy = $("input[ name='policy_num']").val();
                                    location.href="{:url('recordor/update3')}?policy_num="+poliecy;
                                });
                            })
                        </script>
                        {/if}
                        {/in}
                    </div>
                    <div class="item-card-content">
                        <div class="item-card-content-item">
                            货品在{$info.goods_info.present_at}时的现状
                        </div>
                        {if !empty($info.goods_info.goods_list)}
                        {volist name="info.goods_info.goods_list" id="vol"}
                        <div class="item-card-content-item">
                            货品清单：{$vol.name}
                        </div>
                        {/volist}
                        {/if}
                        <div class="item-card-content-item">
                            货品描述：{$info.goods_info.goods_desc}
                        </div>
                        <div class="item-card-content-item" style="display:flex;align-items:center;">
                            <div>上传的照片：</div>
                            {if !empty($info.goods_info.present_img)}
                            {volist name="$info.goods_info.present_img" id="vo"}
                            <div class="pre-view">
                                <img src="{$vo}" style="width: 2.5rem;height: 2.5rem" class="i">
                            </div>
                            {/volist}
                            {/if}
                        </div>
                        <div class="item-card-content-item" style="display:flex;align-items:center;">
                            <div>上传的视频：</div>
                            <div class="pre-view">
                                {$info.goods_info.present_video}
                            </div>
                        </div>
                    </div>
                    {in name="info.status" value="3"}
                    {if  isset($info.bohui_info.goods_return) && !empty($info.bohui_info.situation_return)}
                    <div class="edit-content">

                        {volist name="info.bohui_info.situation_return" id="situation_return"}
                        修改内容：{$situation_return}<br/>
                        {/volist}
                    </div>
                    {/if}
                    {/in}
                </div>
                <div class="item-card">
                    <div class="item-card-header">
                        <div class="">物权信息</div>
                        {in name="info.status" value="3"}
                        {if  isset($info.bohui_info.goods_return) && !empty($info.bohui_info.info_return)}
                        <div class="btn" id="wuquan">修改</div>
                        <script>
                            $(function () {
                                $('#wuquan').on('touchend', function () {
                                    var poliecy = $("input[ name='policy_num']").val();
                                    location.href="{:url('recordor/update4')}?policy_num="+poliecy;
                                });
                            })
                        </script>
                        {/if}
                        {/in}
                    </div>
                    <div class="item-card-content">
                        <div class="item-card-content-item">
                            要求在 {$info.goods_info.should_at} 前处置完成
                        </div>
                        <div class="item-card-content-item">
                            物权单位：{$info.goods_info.rem_company}
                        </div>
                        <div class="item-card-content-item">
                            联系人：{$info.goods_info.linkman}
                        </div>
                        <div class="item-card-content-item">
                            手机号：{$info.goods_info.connect_phone}
                        </div>
                    </div>
                    {in name="info.status" value="3"}
                    {if  isset($info.bohui_info.goods_return) && !empty($info.bohui_info.info_return)}
                    <div class="edit-content">
                        {volist name="info.bohui_info.info_return" id="info_return"}
                        修改内容：{$info_return}<br/>
                        {/volist}
                    </div>
                    {/if}
                    {/in}
                </div>
                <!--<div class="item-card">-->
                    <!--<div class="item-card-header">授权书</div>-->
                    <!--<div class="item-card-content">-->
                        <!--<div class="item-card-content-item" style="display:flex;align-items:center;">-->
                            <!--<div>授权书：</div>-->
                            <!--<div class="pre-view">-->
                                <!--预览-->
                            <!--</div>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
                <div class="btn-box">
                    {in name="info.status" value="1"}
                    <div class="my-btn size-m" id ='submit'>
                        <span class="active">编辑递交</span>
                    </div>
                    <script>
                        $(function () {
                            $('#submit').on('touchend', function () {
                                var poliecy = $("input[ name='policy_num']").val();
                                location.href="{:url('recordor/step_1')}?policy_num="+poliecy;
                            });
                        })
                    </script>
                    {/in}
                    {in name="info.status" value="3"}
                    <div class="my-btn size-m" id ='update'>
                        <span class="active">修改完提交</span>
                    </div>
                    <script>
                        $(function () {
                            $('#update').on('touchend', function () {
                                var poliecy = $("input[ name='policy_num']").val();
                                $.ajax({
                                    type: 'POST',
                                    url: "{:url('recordor/recordConfir')}",
                                    data: {
                                        'policy_num': poliecy,
                                    },
                                    dataType: 'json',
                                    success: function (Json) {
                                        if (Json.code == 200) {
                                            $.alert('提交成功');
                                            location.href="{:url('recordor/alreadyList')}";
                                        } else {
                                            $.alert('提交失败');
                                        }
                                    }
                                });
                            });
                        })
                    </script>
                    {/in}
                </div>
            </div>
        </div>
    </div>
</body>
<script>
    layui.use(['layer'], function(){
        $('.i').on('click',function(){
            var th=$(this);
            var img=th[0].currentSrc;
            layer.open({
                type: 1,
                title: false,
                closeBtn: 0,
                area: '80%',
                skin: 'layui-layer-nobg', //没有背景色
                shadeClose: true,
                content:'<img src="'+img+'" style="width:100%;">'
            });
        });
    });

</script>
</html>